﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Hotel.Models.DataAccess;
using Hotel.Models.Entity;

namespace Hotel.Models.Services
{
    public class FloorService
    {
        public static List<Floor> GetListFloor()
        {
            return DAFloor.GetListFloor(0);
        }

        public static Floor GetFloorDetail(int floorID)
        {
            return DAFloor.GetListFloor(floorID)[0];
        }

        public static bool DeleteFloor(int floorID)
        {
            return DAFloor.DeleteFloor(floorID);
        }

        //Insert : isUpdate = false
        //Update : isUpdate = true
        public static bool SaveFloor(Floor floor, bool isUpdate)
        {
            return DAFloor.SaveFloor(floor, isUpdate);
        }
    }
}